//
//	AddCommentParamModel.swift
//
//	Create by 松 松 on 13/5/2019
//	Copyright © 2019. All rights reserved.
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation


class AddCommentParamModel : NSObject, NSCoding, SSMap{

	public var appCode : String!
	public var commentContent : String!
	public var commentImages : String!
	public var formUserId : String!
	public var fromUserHead : String!
	public var fromUserName : String!
	public var commentId : String!
	public var mainTypeCode : String!
	public var replyCommentId : String!
	public var toItemCode : String!


    override init() {
        
    }
	/**
	 * Instantiate the instance using the passed dictionary values to set the properties values
	 */
	required init(fromDictionary dictionary: [String:Any]){
		appCode = dictionary["appCode"] as? String
		commentContent = dictionary["commentContent"] as? String
		commentImages = dictionary["commentImages"] as? String
		formUserId = dictionary["formUserId"] as? String
		fromUserHead = dictionary["fromUserHead"] as? String
		fromUserName = dictionary["fromUserName"] as? String
		commentId = dictionary["commentId"] as? String
		mainTypeCode = dictionary["mainTypeCode"] as? String
		replyCommentId = dictionary["replyCommentId"] as? String
		toItemCode = dictionary["toItemCode"] as? String
	}

	/**
	 * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property
	 */
	func toDictionary() -> [String:Any]
	{
		var dictionary = [String:Any]()
		if appCode != nil{
			dictionary["appCode"] = appCode
		}
		if commentContent != nil{
			dictionary["commentContent"] = commentContent
		}
		if commentImages != nil{
			dictionary["commentImages"] = commentImages
		}
		if formUserId != nil{
			dictionary["formUserId"] = formUserId
		}
		if fromUserHead != nil{
			dictionary["fromUserHead"] = fromUserHead
		}
		if fromUserName != nil{
			dictionary["fromUserName"] = fromUserName
		}
		if commentId != nil{
			dictionary["commentId"] = commentId
		}
		if mainTypeCode != nil{
			dictionary["mainTypeCode"] = mainTypeCode
		}
		if replyCommentId != nil{
			dictionary["replyCommentId"] = replyCommentId
		}
		if toItemCode != nil{
			dictionary["toItemCode"] = toItemCode
		}
		return dictionary
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         appCode = aDecoder.decodeObject(forKey: "appCode") as? String
         commentContent = aDecoder.decodeObject(forKey: "commentContent") as? String
         commentImages = aDecoder.decodeObject(forKey: "commentImages") as? String
         formUserId = aDecoder.decodeObject(forKey: "formUserId") as? String
         fromUserHead = aDecoder.decodeObject(forKey: "fromUserHead") as? String
         fromUserName = aDecoder.decodeObject(forKey: "fromUserName") as? String
         commentId = aDecoder.decodeObject(forKey: "commentId") as? String
         mainTypeCode = aDecoder.decodeObject(forKey: "mainTypeCode") as? String
         replyCommentId = aDecoder.decodeObject(forKey: "replyCommentId") as? String
         toItemCode = aDecoder.decodeObject(forKey: "toItemCode") as? String

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if appCode != nil{
			aCoder.encode(appCode, forKey: "appCode")
		}
		if commentContent != nil{
			aCoder.encode(commentContent, forKey: "commentContent")
		}
		if commentImages != nil{
			aCoder.encode(commentImages, forKey: "commentImages")
		}
		if formUserId != nil{
			aCoder.encode(formUserId, forKey: "formUserId")
		}
		if fromUserHead != nil{
			aCoder.encode(fromUserHead, forKey: "fromUserHead")
		}
		if fromUserName != nil{
			aCoder.encode(fromUserName, forKey: "fromUserName")
		}
		if commentId != nil{
			aCoder.encode(commentId, forKey: "commentId")
		}
		if mainTypeCode != nil{
			aCoder.encode(mainTypeCode, forKey: "mainTypeCode")
		}
		if replyCommentId != nil{
			aCoder.encode(replyCommentId, forKey: "replyCommentId")
		}
		if toItemCode != nil{
			aCoder.encode(toItemCode, forKey: "toItemCode")
		}

	}

}
